#pragma once
#include "ContourDot.h"

class OrientedArc
{
	float mX, mY, mVx, mVy, mCurvature;
public:
	OrientedArc(const ContourDot&, bool reverse);
	
	bool FindIntersection(const OrientedArc& otherArc,
		float limitForParameter,
		float& outX, float& outY, float& outMyParameter,
		float& outOtherParameter) const;
	void GetTangentVectorAtPoint(float x, float y,
		float& outVx, float& outVy) const;

	float EquationValueAtPoint(float x, float y) const;
	float ParameterAtPoint(float x, float y) const;
	float DiscrepancyWithArc(const OrientedArc& otherArc) const;

private:
	//bool FindIntersectionWithLine(const OrientedArc& otherArc, 
	//	float& outX, float& outY) const;
	//bool FindIntersectionOfCircles(const OrientedArc& otherArc, 
	//	float& outX, float& outY) const;
	bool CheckIntersectionPoint(const OrientedArc& otherArc,
		float limitForParameter,
		float x, float y, float& outMyParameter,
		float& outOtherParameter) const;
};

